# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1RagFile do
  @moduledoc """
  A RagFile contains user data for chunking, embedding and indexing.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this RagFile was created.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. The description of the RagFile.
  *   `directUploadSource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DirectUploadSource.t`, *default:* `nil`) - Output only. The RagFile is encapsulated and uploaded in the UploadRagFile request.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The display name of the RagFile. The name can be up to 128 characters long and can consist of any UTF-8 characters.
  *   `fileStatus` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FileStatus.t`, *default:* `nil`) - Output only. State of the RagFile.
  *   `gcsSource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GcsSource.t`, *default:* `nil`) - Output only. Google Cloud Storage location of the RagFile. It does not support wildcards in the Cloud Storage uri for now.
  *   `googleDriveSource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GoogleDriveSource.t`, *default:* `nil`) - Output only. Google Drive location. Supports importing individual files as well as Google Drive folders.
  *   `jiraSource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1JiraSource.t`, *default:* `nil`) - The RagFile is imported from a Jira query.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the RagFile.
  *   `sharePointSources` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SharePointSources.t`, *default:* `nil`) - The RagFile is imported from a SharePoint source.
  *   `slackSource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SlackSource.t`, *default:* `nil`) - The RagFile is imported from a Slack channel.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this RagFile was last updated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :directUploadSource =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DirectUploadSource.t() | nil,
          :displayName => String.t() | nil,
          :fileStatus =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FileStatus.t() | nil,
          :gcsSource => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GcsSource.t() | nil,
          :googleDriveSource =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GoogleDriveSource.t() | nil,
          :jiraSource =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1JiraSource.t() | nil,
          :name => String.t() | nil,
          :sharePointSources =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SharePointSources.t() | nil,
          :slackSource =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SlackSource.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:createTime, as: DateTime)
  field(:description)

  field(:directUploadSource,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DirectUploadSource
  )

  field(:displayName)
  field(:fileStatus, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FileStatus)
  field(:gcsSource, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GcsSource)

  field(:googleDriveSource,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GoogleDriveSource
  )

  field(:jiraSource, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1JiraSource)
  field(:name)

  field(:sharePointSources,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SharePointSources
  )

  field(:slackSource, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SlackSource)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1RagFile do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1RagFile.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1RagFile do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
